{% extends "base_jrcadmin2.html" %}

{% block mainheading %}{{ block.super }} \ Signals \ {{ month|date:"Y" }} \ {{ month|date:"F" }}{% endblock %}

{% block object-tools %}

    <ul class="object-tools">
        <li><a href="/jrcsignal/parse/">Import signals</a></li>
    </ul>

{% endblock %}

{% block content %}

    <a href="/jrcsignal/{{ previous_month|date:"Y" }}/{{ previous_month|date:"b" }}/">&laquo;</a>
    {{ month|date:"Y-m" }}
    <a href="/jrcsignal/{{ next_month|date:"Y" }}/{{ next_month|date:"b" }}/">&raquo;</a>
    <br />
    
    
    <table>
        <thead>
            <tr>
                <th>PK</th>
                <th>CST</th>
                <th>Entry date</th>
                <th>Exit date</th>
                <th>Direction</th>
                <th>Direction</th>
                <th>Entry</th>
                <th>Exit</th>
                <th>&nbsp;</th>
            </tr>
        </thead>
        <tbody>

        {% for s in object_list %}
            <tr class="{% cycle "row1" "row2" %}">
                <td>{{ s.pk }}</td>
                <td>{{ s.cst_id.name }}</td>
                <td>{{ s.date_first|date:"Y-m-d" }}</td>
                <td>{{ s.date_second|date:"Y-m-d" }}</td>
                <td>{{ s.get_direction_first_name }}</td>
                <td>{{ s.get_direction_second_name }}</td>
                <td>{{ s.entry_value }}</td>
                <td>{{ s.exit_value }}</td>
                <td>
                    <a href="/jrcsignal/{{ s.pk }}/edit/" class="changelink">&nbsp;</a>
                    <a href="/jrcsignal/{{ s.pk }}/delete/" class="deletelink">&nbsp;</a>
                </td>
            </tr>

        {% empty %}
            <tr>
                <td colspan="9">No signals!</td>
            </tr>
        {% endfor %}
    
        </tbody>

        <tr>
            <td colspan="9">
                <input type="button" value="Import signals" class="default" onclick="document.location.href='/jrcsignal/parse/'" />
            </td>
        </tr>
    
    </table>
    
{% endblock %}